home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 October / CHIP Turkiye Ekim 2000.iso / prog / naps / 04 / setup.exe / Gnucleus / ViewConnect.h < prev    next >
C/C++ Source or Header  |  2000-07-15  |  3KB  |  101 lines

  1. // ViewConnect.h : interface of the CViewConnect class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_VIEWCONNECT_H__1AE2E5D2_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_)
  6. #define AFX_VIEWCONNECT_H__1AE2E5D2_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12. #include "ListCtrlEx.h"
  13.  
  14. class CViewConnect : public CFormView
  15. {
  16. protected: // create from serialization only
  17.     CViewConnect();
  18.     DECLARE_DYNCREATE(CViewConnect)
  19.  
  20.     BOOL AddConnect(CString Host, CString Port);
  21.  
  22. public:
  23.     //{{AFX_DATA(CViewConnect)
  24.     enum { IDD = IDD_VIEW_CONNECT };
  25.     CComboBox    m_cbxHost;
  26.     CButton    m_btnAdd;
  27.     CButton    m_btnRemove;
  28.     CEdit    m_ebPort;
  29.     CStatic    m_stcConnect;
  30.     CListCtrlEx    m_lstCache;
  31.     CListCtrlEx    m_lstConnected;
  32.     CButton    m_stcAdd;
  33.     CStatic    m_stcExist;
  34.     CStatic    m_stcHost;
  35.     CStatic    m_stcPort;
  36.     //}}AFX_DATA
  37.  
  38. // Attributes
  39. public:
  40.     int oneSec;
  41.  
  42.     CGnucleusDoc* GetDocument();
  43.  
  44. // Operations
  45. public:
  46.     void RemoveFirstNode();
  47.  
  48. // Overrides
  49.     // ClassWizard generated virtual function overrides
  50.     //{{AFX_VIRTUAL(CViewConnect)
  51.     public:
  52.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  53.     protected:
  54.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  55.     virtual void OnInitialUpdate(); // called first time after construct
  56.     //}}AFX_VIRTUAL
  57.  
  58. // Implementation
  59. public:
  60.     virtual ~CViewConnect();
  61. #ifdef _DEBUG
  62.     virtual void AssertValid() const;
  63.     virtual void Dump(CDumpContext& dc) const;
  64. #endif
  65.  
  66. protected:
  67.     BOOL ConnectRandomNode();
  68.     UINT UpdateTimer;
  69.  
  70.     CButton   *btnSearch;
  71.     CComboBox *cbKeyword;
  72.     CComboBox *cbSpeed;
  73.  
  74. // Generated message map functions
  75. protected:
  76.     //{{AFX_MSG(CViewConnect)
  77.     afx_msg void OnSize(UINT nType, int cx, int cy);
  78.     afx_msg void OnButtonAdd();
  79.     afx_msg void OnTimer(UINT nIDEvent);
  80.     afx_msg void OnButtonRemove();
  81.     afx_msg void OnDblclkLstConnected(NMHDR* pNMHDR, LRESULT* pResult);
  82.     afx_msg void OnDblclkLstCache(NMHDR* pNMHDR, LRESULT* pResult);
  83.     afx_msg void OnKillfocusLstConnected(NMHDR* pNMHDR, LRESULT* pResult);
  84.     afx_msg void OnEditPaste();
  85.     afx_msg void OnChangeEditPort();
  86.     //}}AFX_MSG
  87.     DECLARE_MESSAGE_MAP()
  88. };
  89.  
  90. #ifndef _DEBUG  // debug version in ViewConnect.cpp
  91. inline CGnucleusDoc* CViewConnect::GetDocument()
  92.    { return (CGnucleusDoc*)m_pDocument; }
  93. #endif
  94.  
  95. /////////////////////////////////////////////////////////////////////////////
  96.  
  97. //{{AFX_INSERT_LOCATION}}
  98. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  99.  
  100. #endif // !defined(AFX_VIEWCONNECT_H__1AE2E5D2_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_)
  101.